/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.me.entityBeans;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Administrador
 */
@Entity
@Table(name = "T_CREDITOS", catalog = "", schema = "OMEGA")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TCreditos.findAll", query = "SELECT t FROM TCreditos t"),
    @NamedQuery(name = "TCreditos.findByNIdCreditoPk", query = "SELECT t FROM TCreditos t WHERE t.nIdCreditoPk = :nIdCreditoPk"),
    @NamedQuery(name = "TCreditos.findByDFechaCredito", query = "SELECT t FROM TCreditos t WHERE t.dFechaCredito = :dFechaCredito"),
    @NamedQuery(name = "TCreditos.findByNPrestamo", query = "SELECT t FROM TCreditos t WHERE t.nPrestamo = :nPrestamo"),
    @NamedQuery(name = "TCreditos.findByNTotalPrestamos", query = "SELECT t FROM TCreditos t WHERE t.nTotalPrestamos = :nTotalPrestamos"),
    @NamedQuery(name = "TCreditos.findByNInteresMensual", query = "SELECT t FROM TCreditos t WHERE t.nInteresMensual = :nInteresMensual"),
    @NamedQuery(name = "TCreditos.findByNInteresQuincenal", query = "SELECT t FROM TCreditos t WHERE t.nInteresQuincenal = :nInteresQuincenal"),
    @NamedQuery(name = "TCreditos.findByNCuotaMensual", query = "SELECT t FROM TCreditos t WHERE t.nCuotaMensual = :nCuotaMensual"),
    @NamedQuery(name = "TCreditos.findByNCuotaQuincenal", query = "SELECT t FROM TCreditos t WHERE t.nCuotaQuincenal = :nCuotaQuincenal"),
    @NamedQuery(name = "TCreditos.findByNDiasPactadosPago", query = "SELECT t FROM TCreditos t WHERE t.nDiasPactadosPago = :nDiasPactadosPago"),
    @NamedQuery(name = "TCreditos.findByDFechaPactadaPago", query = "SELECT t FROM TCreditos t WHERE t.dFechaPactadaPago = :dFechaPactadaPago"),
    @NamedQuery(name = "TCreditos.findByNCambioSolesVenta", query = "SELECT t FROM TCreditos t WHERE t.nCambioSolesVenta = :nCambioSolesVenta"),
    @NamedQuery(name = "TCreditos.findByNCambioSolesCompra", query = "SELECT t FROM TCreditos t WHERE t.nCambioSolesCompra = :nCambioSolesCompra"),
    @NamedQuery(name = "TCreditos.findByVTablaDetalle", query = "SELECT t FROM TCreditos t WHERE t.vTablaDetalle = :vTablaDetalle"),
    @NamedQuery(name = "TCreditos.findByVNumeroDocumento", query = "SELECT t FROM TCreditos t WHERE t.vNumeroDocumento = :vNumeroDocumento"),
    @NamedQuery(name = "TCreditos.findByNMontoGuardianCocheraOtros", query = "SELECT t FROM TCreditos t WHERE t.nMontoGuardianCocheraOtros = :nMontoGuardianCocheraOtros"),
    @NamedQuery(name = "TCreditos.findByVObservacionesCredito", query = "SELECT t FROM TCreditos t WHERE t.vObservacionesCredito = :vObservacionesCredito"),
    @NamedQuery(name = "TCreditos.findByVEstadoCredito", query = "SELECT t FROM TCreditos t WHERE t.vEstadoCredito = :vEstadoCredito")})
public class TCreditos implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "N_ID_CREDITO_PK")
    private Long nIdCreditoPk;
    @Basic(optional = false)
    @Column(name = "D_FECHA_CREDITO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dFechaCredito;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Basic(optional = false)
    @Column(name = "N_PRESTAMO")
    private BigDecimal nPrestamo;
    @Basic(optional = false)
    @Column(name = "N_TOTAL_PRESTAMOS")
    private BigDecimal nTotalPrestamos;
    @Basic(optional = false)
    @Column(name = "N_INTERES_MENSUAL")
    private BigDecimal nInteresMensual;
    @Basic(optional = false)
    @Column(name = "N_INTERES_QUINCENAL")
    private BigDecimal nInteresQuincenal;
    @Basic(optional = false)
    @Column(name = "N_CUOTA_MENSUAL")
    private BigDecimal nCuotaMensual;
    @Basic(optional = false)
    @Column(name = "N_CUOTA_QUINCENAL")
    private BigDecimal nCuotaQuincenal;
    @Basic(optional = false)
    @Column(name = "N_DIAS_PACTADOS_PAGO")
    private int nDiasPactadosPago;
    @Basic(optional = false)
    @Column(name = "D_FECHA_PACTADA_PAGO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dFechaPactadaPago;
    @Column(name = "N_CAMBIO_SOLES_VENTA")
    private BigDecimal nCambioSolesVenta;
    @Column(name = "N_CAMBIO_SOLES_COMPRA")
    private BigDecimal nCambioSolesCompra;
    @Column(name = "V_TABLA_DETALLE")
    private String vTablaDetalle;
    @Column(name = "V_NUMERO_DOCUMENTO")
    private String vNumeroDocumento;
    @Column(name = "N_MONTO_GUARDIAN_COCHERA_OTROS")
    private BigDecimal nMontoGuardianCocheraOtros;
    @Column(name = "V_OBSERVACIONES_CREDITO")
    private String vObservacionesCredito;
    @Basic(optional = false)
    @Column(name = "V_ESTADO_CREDITO")
    private String vEstadoCredito;
    @JoinColumn(name = "N_ID_TIPODOCUMENTO_FK", referencedColumnName = "N_ID_TIPODOCUMENTO_PK")
    @ManyToOne
    private TTiposDocumentos nIdTipodocumentoFk;
    @JoinColumn(name = "N_ID_NOTARIA_FK", referencedColumnName = "N_ID_NOTARIA_PK")
    @ManyToOne
    private TNotarias nIdNotariaFk;
    @JoinColumn(name = "N_ID_MONEDA_FK", referencedColumnName = "N_ID_MONEDA_PK")
    @ManyToOne(optional = false)
    private TMonedas nIdMonedaFk;
    @JoinColumn(name = "N_ID_CTE_FK", referencedColumnName = "N_ID_CTE_PK")
    @ManyToOne(optional = false)
    private TClientes nIdCteFk;

    public TCreditos() {
    }

    public TCreditos(Long nIdCreditoPk) {
        this.nIdCreditoPk = nIdCreditoPk;
    }

    public TCreditos(Long nIdCreditoPk, Date dFechaCredito, BigDecimal nPrestamo, BigDecimal nTotalPrestamos, BigDecimal nInteresMensual, BigDecimal nInteresQuincenal, BigDecimal nCuotaMensual, BigDecimal nCuotaQuincenal, int nDiasPactadosPago, Date dFechaPactadaPago, String vEstadoCredito) {
        this.nIdCreditoPk = nIdCreditoPk;
        this.dFechaCredito = dFechaCredito;
        this.nPrestamo = nPrestamo;
        this.nTotalPrestamos = nTotalPrestamos;
        this.nInteresMensual = nInteresMensual;
        this.nInteresQuincenal = nInteresQuincenal;
        this.nCuotaMensual = nCuotaMensual;
        this.nCuotaQuincenal = nCuotaQuincenal;
        this.nDiasPactadosPago = nDiasPactadosPago;
        this.dFechaPactadaPago = dFechaPactadaPago;
        this.vEstadoCredito = vEstadoCredito;
    }

    public Long getNIdCreditoPk() {
        return nIdCreditoPk;
    }

    public void setNIdCreditoPk(Long nIdCreditoPk) {
        this.nIdCreditoPk = nIdCreditoPk;
    }

    public Date getDFechaCredito() {
        return dFechaCredito;
    }

    public void setDFechaCredito(Date dFechaCredito) {
        this.dFechaCredito = dFechaCredito;
    }

    public BigDecimal getNPrestamo() {
        return nPrestamo;
    }

    public void setNPrestamo(BigDecimal nPrestamo) {
        this.nPrestamo = nPrestamo;
    }

    public BigDecimal getNTotalPrestamos() {
        return nTotalPrestamos;
    }

    public void setNTotalPrestamos(BigDecimal nTotalPrestamos) {
        this.nTotalPrestamos = nTotalPrestamos;
    }

    public BigDecimal getNInteresMensual() {
        return nInteresMensual;
    }

    public void setNInteresMensual(BigDecimal nInteresMensual) {
        this.nInteresMensual = nInteresMensual;
    }

    public BigDecimal getNInteresQuincenal() {
        return nInteresQuincenal;
    }

    public void setNInteresQuincenal(BigDecimal nInteresQuincenal) {
        this.nInteresQuincenal = nInteresQuincenal;
    }

    public BigDecimal getNCuotaMensual() {
        return nCuotaMensual;
    }

    public void setNCuotaMensual(BigDecimal nCuotaMensual) {
        this.nCuotaMensual = nCuotaMensual;
    }

    public BigDecimal getNCuotaQuincenal() {
        return nCuotaQuincenal;
    }

    public void setNCuotaQuincenal(BigDecimal nCuotaQuincenal) {
        this.nCuotaQuincenal = nCuotaQuincenal;
    }

    public int getNDiasPactadosPago() {
        return nDiasPactadosPago;
    }

    public void setNDiasPactadosPago(int nDiasPactadosPago) {
        this.nDiasPactadosPago = nDiasPactadosPago;
    }

    public Date getDFechaPactadaPago() {
        return dFechaPactadaPago;
    }

    public void setDFechaPactadaPago(Date dFechaPactadaPago) {
        this.dFechaPactadaPago = dFechaPactadaPago;
    }

    public BigDecimal getNCambioSolesVenta() {
        return nCambioSolesVenta;
    }

    public void setNCambioSolesVenta(BigDecimal nCambioSolesVenta) {
        this.nCambioSolesVenta = nCambioSolesVenta;
    }

    public BigDecimal getNCambioSolesCompra() {
        return nCambioSolesCompra;
    }

    public void setNCambioSolesCompra(BigDecimal nCambioSolesCompra) {
        this.nCambioSolesCompra = nCambioSolesCompra;
    }

    public String getVTablaDetalle() {
        return vTablaDetalle;
    }

    public void setVTablaDetalle(String vTablaDetalle) {
        this.vTablaDetalle = vTablaDetalle;
    }

    public String getVNumeroDocumento() {
        return vNumeroDocumento;
    }

    public void setVNumeroDocumento(String vNumeroDocumento) {
        this.vNumeroDocumento = vNumeroDocumento;
    }

    public BigDecimal getNMontoGuardianCocheraOtros() {
        return nMontoGuardianCocheraOtros;
    }

    public void setNMontoGuardianCocheraOtros(BigDecimal nMontoGuardianCocheraOtros) {
        this.nMontoGuardianCocheraOtros = nMontoGuardianCocheraOtros;
    }

    public String getVObservacionesCredito() {
        return vObservacionesCredito;
    }

    public void setVObservacionesCredito(String vObservacionesCredito) {
        this.vObservacionesCredito = vObservacionesCredito;
    }

    public String getVEstadoCredito() {
        return vEstadoCredito;
    }

    public void setVEstadoCredito(String vEstadoCredito) {
        this.vEstadoCredito = vEstadoCredito;
    }

    public TTiposDocumentos getNIdTipodocumentoFk() {
        return nIdTipodocumentoFk;
    }

    public void setNIdTipodocumentoFk(TTiposDocumentos nIdTipodocumentoFk) {
        this.nIdTipodocumentoFk = nIdTipodocumentoFk;
    }

    public TNotarias getNIdNotariaFk() {
        return nIdNotariaFk;
    }

    public void setNIdNotariaFk(TNotarias nIdNotariaFk) {
        this.nIdNotariaFk = nIdNotariaFk;
    }

    public TMonedas getNIdMonedaFk() {
        return nIdMonedaFk;
    }

    public void setNIdMonedaFk(TMonedas nIdMonedaFk) {
        this.nIdMonedaFk = nIdMonedaFk;
    }

    public TClientes getNIdCteFk() {
        return nIdCteFk;
    }

    public void setNIdCteFk(TClientes nIdCteFk) {
        this.nIdCteFk = nIdCteFk;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nIdCreditoPk != null ? nIdCreditoPk.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TCreditos)) {
            return false;
        }
        TCreditos other = (TCreditos) object;
        if ((this.nIdCreditoPk == null && other.nIdCreditoPk != null) || (this.nIdCreditoPk != null && !this.nIdCreditoPk.equals(other.nIdCreditoPk))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.me.entityBeans.TCreditos[ nIdCreditoPk=" + nIdCreditoPk + " ]";
    }
    
}
